package jpa.entitys.synchro.staging;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the SYNC_QUEUE database table.
 * 
 */
@Entity
@Table(name="SYNC_QUEUE")
@NamedQueries({
    @NamedQuery(name = "SyncQueue.findAll", query = " SELECT c FROM SyncQueue c order by c.queueId asc"),
    @NamedQuery(name = "SyncQueue.findIsProcessing", query = " SELECT c FROM SyncQueue c WHERE c.isProcessing = :isProcessing And c.isActive = :isActive order by c.queueId asc"),
    @NamedQuery(name = "SyncQueue.findById", query = " SELECT c FROM SyncQueue c WHERE c.queueId = :Id"),
    @NamedQuery(name = "SyncQueue.findMin", query = " SELECT c FROM SyncQueue c WHERE c.queueId = (select min(x.queueId) from SyncQueue x where x.processLevel is null And x.isProcessing='N' And x.isActive='Y')"),
    @NamedQuery(name = "SyncQueue.findMax", query = " SELECT c FROM SyncQueue c WHERE c.queueId = (select max(x.queueId) from SyncQueue x where x.processLevel is null And x.isProcessing='N' And x.isActive='Y')"),
    @NamedQuery(name = "SyncQueue.findByCondition", query = " SELECT c FROM SyncQueue c WHERE c.processModule = 'COMMONS' order by c.queueId asc")
    })
public class SyncQueue extends jpa.entitys.synchro.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="QUEUE_ID")
	private BigDecimal queueId;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}
	
	@Column(name="IS_ACTIVE")
	private String isActive;

	@Column(name="IS_PROCESSING")
	private String isProcessing;
	
	@Column(name="PROCESSING_NAME")
	private String processingName;
	
	@Column(name="PROC_CREATEDBY")
	private String procCreatedby;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="PROC_CREATEDON")
	private Date procCreatedon;

	@Column(name="PROC_UPDATEDBY")
	private String procUpdatedby;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="PROC_UPDATEDON")
	private Date procUpdatedon;

	@Column(name="PROCESS_CODE")
	private String processCode;

	@Column(name="PROCESS_DESC")
	private String processDesc;

	@Column(name="PROCESS_MODULE")
	private String processModule;

	@Column(name="PROCESS_PATH")
	private String processPath;
	
	@Column(name="PROCESS_ACTION")
	private String processAction;	

	@Column(name="QUEUE_SEQUENCE")
	private BigDecimal queueSequence;
	
	@Column(name="PROCESSING_COUNT")
	private Integer processingCount;

	@Column(name="PROCESS_LEVEL")
	private String processLevel;

	/**
	 * @return the queueId
	 */
	public synchronized BigDecimal getQueueId() {
		return queueId;
	}

	/**
	 * @param queueId the queueId to set
	 */
	public synchronized void setQueueId(BigDecimal queueId) {
		this.queueId = queueId;
	}

	/**
	 * @return the isActive
	 */
	public synchronized String getIsActive() {
		return isActive;
	}

	/**
	 * @param isActive the isActive to set
	 */
	public synchronized void setIsActive(String isActive) {
		this.isActive = isActive;
	}

	/**
	 * @return the isProcessing
	 */
	public synchronized String getIsProcessing() {
		return isProcessing;
	}

	/**
	 * @param isProcessing the isProcessing to set
	 */
	public synchronized void setIsProcessing(String isProcessing) {
		this.isProcessing = isProcessing;
	}

	/**
	 * @return the processingName
	 */
	public synchronized String getProcessingName() {
		return processingName;
	}

	/**
	 * @param processingName the processingName to set
	 */
	public synchronized void setProcessingName(String processingName) {
		this.processingName = processingName;
	}

	/**
	 * @return the procCreatedby
	 */
	public synchronized String getProcCreatedby() {
		return procCreatedby;
	}

	/**
	 * @param procCreatedby the procCreatedby to set
	 */
	public synchronized void setProcCreatedby(String procCreatedby) {
		this.procCreatedby = procCreatedby;
	}

	/**
	 * @return the procCreatedon
	 */
	public synchronized Date getProcCreatedon() {
		return procCreatedon;
	}

	/**
	 * @param procCreatedon the procCreatedon to set
	 */
	public synchronized void setProcCreatedon(Date procCreatedon) {
		this.procCreatedon = procCreatedon;
	}

	/**
	 * @return the procUpdatedby
	 */
	public synchronized String getProcUpdatedby() {
		return procUpdatedby;
	}

	/**
	 * @param procUpdatedby the procUpdatedby to set
	 */
	public synchronized void setProcUpdatedby(String procUpdatedby) {
		this.procUpdatedby = procUpdatedby;
	}

	/**
	 * @return the procUpdatedon
	 */
	public synchronized Date getProcUpdatedon() {
		return procUpdatedon;
	}

	/**
	 * @param procUpdatedon the procUpdatedon to set
	 */
	public synchronized void setProcUpdatedon(Date procUpdatedon) {
		this.procUpdatedon = procUpdatedon;
	}

	/**
	 * @return the processCode
	 */
	public synchronized String getProcessCode() {
		return processCode;
	}

	/**
	 * @param processCode the processCode to set
	 */
	public synchronized void setProcessCode(String processCode) {
		this.processCode = processCode;
	}

	/**
	 * @return the processDesc
	 */
	public synchronized String getProcessDesc() {
		return processDesc;
	}

	/**
	 * @param processDesc the processDesc to set
	 */
	public synchronized void setProcessDesc(String processDesc) {
		this.processDesc = processDesc;
	}

	/**
	 * @return the processModule
	 */
	public synchronized String getProcessModule() {
		return processModule;
	}

	/**
	 * @param processModule the processModule to set
	 */
	public synchronized void setProcessModule(String processModule) {
		this.processModule = processModule;
	}

	/**
	 * @return the processPath
	 */
	public synchronized String getProcessPath() {
		return processPath;
	}

	/**
	 * @param processPath the processPath to set
	 */
	public synchronized void setProcessPath(String processPath) {
		this.processPath = processPath;
	}

	/**
	 * @return the processAction
	 */
	public synchronized String getProcessAction() {
		return processAction;
	}

	/**
	 * @param processAction the processAction to set
	 */
	public synchronized void setProcessAction(String processAction) {
		this.processAction = processAction;
	}

	/**
	 * @return the queueSequence
	 */
	public synchronized BigDecimal getQueueSequence() {
		return queueSequence;
	}

	/**
	 * @param queueSequence the queueSequence to set
	 */
	public synchronized void setQueueSequence(BigDecimal queueSequence) {
		this.queueSequence = queueSequence;
	}

	/**
	 * @return the processingCount
	 */
	public synchronized Integer getProcessingCount() {
		return processingCount;
	}

	/**
	 * @param processingCount the processingCount to set
	 */
	public synchronized void setProcessingCount(Integer processingCount) {
		this.processingCount = processingCount;
	}

	/**
	 * @return the processLevel
	 */
	public synchronized String getProcessLevel() {
		return processLevel;
	}

	/**
	 * @param processLevel the processLevel to set
	 */
	public synchronized void setProcessLevel(String processLevel) {
		this.processLevel = processLevel;
	}	
	
	
	
}